package com.macro.mall.service;

import com.macro.mall.bean.entity.TbPorderSeq;
import com.macro.mall.bean.entity.TbServerSeq;
import com.macro.mall.dao.TbPorderSeqDao;
import com.macro.mall.dao.TbServerSeqDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IdGeneratorService {

    @Autowired
    private TbServerSeqDao tbServerSeqDao;

    @Autowired
    private TbPorderSeqDao tbPorderSeqDao;

    /**
     *   获取tbServerSeq的id值
     */
    public Long getTbServerSeqId(){
        TbServerSeq tbServerSeq = new TbServerSeq();
        tbServerSeq.setRemark("remark");
        TbServerSeq result = tbServerSeqDao.insert(tbServerSeq);
        return result.getId();
    }

    /**
     *   获取tbPorderSeq的id值
     */
    public Long getTbPorderSeqId(){
        TbPorderSeq tbPorderSeq = new TbPorderSeq();
        tbPorderSeq.setRemark("remark");
        TbPorderSeq result = tbPorderSeqDao.insert(tbPorderSeq);
        return result.getId();
    }

}
